#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
void example_p336();
void practice_10_1();
void practice_10_2();
int main()
{
	//example_p336();
	//practice_10_1();
	practice_10_2();
	return 0;
}
void example_p336()
{
	int val=42;
	vector<int> vec{1,56,42,15,33,66};
	vector<int>::const_iterator result=find(vec.cbegin(),vec.cend(),val);
	cout<<*result<<" "<<(result==vec.cend())<<endl;
}
void practice_10_1()
{
	int val=4;
	vector<int> vec{1,2,4,5,6,4,5,4};
	auto cnt=count(vec.cbegin(),vec.cend(),val);
	cout<<cnt<<endl;
}
void practice_10_2()
{
	string word("zyl");
	vector<string> vec{"zyl","zyl111ok","zyl"};
	auto cnt=count(vec.cbegin(),vec.cend(),word);
	cout<<cnt<<endl;
}





